<div class="content">
	<textarea id="pre">
		<!-- 引入某个目录下面的公共组件 -->
		<!-- 方案1 -->
		const context = require.context('./', true, /\.vue$/);
		const install = (Vue) => {
		  context.keys().forEach((key) => {
		    const component = context(key).default;
		    Vue.component(component.name, component);
		  });
		};
		<!-- 方案2 -->
		const context = require.context("./", true, /\.vue$/);
		const cmps = {};
		context.keys().forEach((key) => {
		  const component = context(key).default;
		  cmps[component.name] = component;
		});

		  components: {
		    ...cmps,
		  },
	</textarea>
</div>